home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
Archives
/
ForCLI
/
wsz13.lzh
/
wsz.doc
< prev
Wrap
Text File
|
1993-12-12
|
12KB
|
394 lines
Note: I made some small edits for english. - Jim 8's (uploader)
aites@hpsmpa.lvld.hp.com -or- jim@hpsmpk.lvld.hp.com
--------------------------------------------------------------------------
WSZ 1.3
1992-09-18
By Jimmy Westerlund
FOR USE WITH V36+ ONLY !!!!!
DISCLAIMER
This program is FREEWARE. It may be spread to everyone under the
condition that no charge is taken except for disc- and copying costs.
The program may not be used as a part of a commercial product without
the written permisson of the author. The contents in the distribution
archive may not be changed. The author cannot be held responsible for
any damage the program may cause.
If you like this program, you are free to send me something.
(Money, pictures (on disk, IFF or GIF), pictures (on paper),
dogfood (for granny:-), programs (NO pirate copies), greetings
and so on). But PLEASE don't send me anything that counts in
megaton, I prefer SEK :-). Swedish users can pay to my postgiro account.
ARCHIVE CONTENTS in version 1.3
Name What Size
--------------- --------------- -------
WSZ Main file. 9332
WSZ.C Source file. 15309
WSZ.DOC This file 11953
WHY
This program was generated because I wanted to test an idea I had.
And it worked. WSZ allows you to easily change the size of a window,
either by specifying your own values or using one of the built in
options. A number of other commands are also included.
NOTE: WSZ can only be used on V36 (2.00) or above!!!
SYNTAX
WSZ [flag] [flag] [flag] [and so on...]
Flags:
X[+|-|/|*|S]n : Puts window n pixels from screens left border.
Y[+|-|/|*|S]n : Puts window n pixels below screens top border.
W[+|-|/|*|S]n : Change width of window to n pixels.
H[+|-|/|*|S]n : Change height of window to n pixels.
E[+|-]n : Changes the X-position of a screen.
T[+|-]n : Changes the Y-position of a screen.
C[W|S|R]n : Temporary changes the "active" window or screen.
I[S|W] : Info about the window.
M[+|-]n : Removes/adds bitmaps to a window.
U[W/S] : Updates a window or screen.
Kn : Closes a window.
Fn : Move the window to the front.
Bn : Move the window to the back.
Zn : Zooms a window.
V : Views a list of all screens and windows.
Dn : Delays n/50 seconds before continuing.
Rn : Repeat flags n times. n=0 for endless repeats.
An : Sleeps until user changes window. Checks every
n/50 seconds.
Lfile : Loads a script, located in either current dir or
in s:.
Note : If no flags are specified, the flags XS YS WS and HS will be
used.
Note II: If no command is used in one of the first four arguments,
the commands X, Y, W and H will be used. For example
WSZ 0 0 640 256 equals WSZ X0 Y0 W640 H256.
SUMMARY OF COMMANDS
---------------------------------------------------------------------------
COMMAND: X - coordinate
SYNTAX: X[+|-|S]n
PURPOSE: This command puts the window n pixels to the right of
the screens left border.
If you specify a +, -, * or / the change will be relative
to the current position.
If S is used, then the value for the screen will be used.
EXAMPLE: X10 : Puts the window 10 pixels from the border.
X+5 : Puts the window 5 pixels right of current
position.
X-10 : Moves the window 10 pixels to the left.
XS : Same as X0
---------------------------------------------------------------------------
COMMAND: Y - coordinate
SYNTAX: Y[+|-|S]n
PURPOSE: Same as the X command, but puts the window n pixels
below the top of the screen.
EXAMPLE: Y10 : Puts the window 10 pixels below the top.
Y+5 : Moves the window down 5 pixels.
Y-10 : Moves the window 10 pixels up.
YS : Same as X0
---------------------------------------------------------------------------
COMMAND: Width
SYNTAX: W[+|-|S]n
PURPOSE: Changes the width of the window.
EXAMPLE: W10 : Makes the window 10 pixels wide.
W+5 : Increases the width with 5 pixels.
W-10 : Decreases the width with 10 pixels.
WS : Makes the window as wide as the screen.
---------------------------------------------------------------------------
COMMAND: Height
SYNTAX: H[+|-|S]n
PURPOSE: Changes the height of the window.
EXAMPLE: W10 : Makes the window 10 pixels high.
W+5 : Increases the height with 5 pixels.
H-10 : Decreases the height with 10 pixels.
HS : Makes the window as high as the screen.
---------------------------------------------------------------------------
COMMAND: lEft
SYNTAX: E[+|-]n
PURPOSE: Moves the top left corner of the active screen to
the X-coordinate n. Changes can be done relative to
current position using the + or - flag. See the
X command above.
---------------------------------------------------------------------------
COMMAND: Update
SYNTAX: U[W|S]
PURPOSE: Updates a screen or window size/position. See bug
header for more info.
---------------------------------------------------------------------------
COMMAND: Top
SYNTAX: T[+|-]n
PURPOSE: Moves the top left corner of the active screen to the
Y-coordinate n. See the E and the Y command above for
further information.
---------------------------------------------------------------------------
COMMAND: Change
SYNTAX: C[S/W/R]n
PURPOSE: Temporary change the active "screen" or "window" to the
address n. If R is used, then the values will be resetted
to the real "active" screen and window.
NOTE: The address are to be written in DEC, not in hex.
EXAMPLE: WSZ V gave for example:
* Screen 'Workbench Screen' at adress 2419432...
* Window 'AmigaShell' at adress 2362888
Window 'Workbench' at adress 2355888
if the user wants a info about the 'Workbench',
the following line could be used.
WSZ CW2355888 IW CR
WARNING: Be sure to enter a correct address when using this command.
An incorrect address can result in a CRASH!!! This command
is NOT for novice users. Use at your own risk....
---------------------------------------------------------------------------
COMMAND: bitMap
SYNTAX: M[+|-]n
PURPOSE: Adds/removes bitmaps to/from a window. Removing one bitmap
from a 640*256 pixel large window frees 20480 bytes, but
reduces the number of colors available by half.
EXAMPLE: WSZ M- Removes all but one bitmaps from a window.
WSZ M-2 Removes all but two bitmaps from a window.
WSZ M+ Adds one bitmap to a window.
WSZ M+3 Adds bitplans until window got three bitmaps.
---------------------------------------------------------------------------
COMMAND: Kill
SYNTAX: Kn
PURPOSE: Tries to close a window. Has the same effect as clicking on
the Closegadget. Doesn't work for windows without the
closegadget. If n is specified, then n will be used as the
address to the window, else current window is closed.
---------------------------------------------------------------------------
COMMAND: Front
SYNTAX: Fn
PURPOSE: Moves the window to the front. If n is used, then the window
at the address n will be moved. Otherwise the active window.
---------------------------------------------------------------------------
COMMAND: Back
SYNTAX: Bn
PURPOSE: Moves the window to the back. If n is used, then the window
at the address n will be moved. Otherwise the active window.
---------------------------------------------------------------------------
COMMAND: Zoom
SYNTAX: Zn
PURPOSE: Zooms the window, same as clicking the zoom gadget. If
n is used, then the window at the address n will be
zoomed. Otherwise the active window.
---------------------------------------------------------------------------
COMMAND: Information
SYNTAX: I[W/S]
PURPOSE: Prints information about the active screen and the active
window. If a flag is specified, then WSZ will print info
only about the [S]creen or the [W]indow.
---------------------------------------------------------------------------
COMMAND: View
SYNTAX: V
PURPOSE: Displays a list of all screens and their windows.
A * means this screen/window is the active one.
---------------------------------------------------------------------------
COMMAND: Delay
SYNTAX: Dn
PURPOSE: Sleeps in n/50 seconds.
---------------------------------------------------------------------------
COMMAND: Active
SYNTAX: An
PURPOSE: Checks every n/50 second to see if the user activated
another window. When another is activated, WSZ continues
with the next command.
---------------------------------------------------------------------------
COMMAND: Repeat
SYNTAX: Rn
PURPOSE: Repeats the commands n times. If n equals 0, the repeat
will be done forever. Nested repeats are allowed.
---------------------------------------------------------------------------
COMMAND: Load
SYNTAX: Lfile
PURPOSE: Loads the file 'file' and executes the commands in the
file. 'file' must be located in either current directory
or in S: directory.
---------------------------------------------------------------------------
EXAMPLES
1> To change the size of the window:
WSZ x10 y20 w500 h150 or
WSZ 10 20 500 150
This makes the window 500 * 150 pixels large, with the upper
left corner at the position (10,20).
2> To change the width of the window:
WSZ w450
This gives the new window a width of 450 pixels.
3> To move the window to the upper left corner:
WSZ x0 y0 or
WSZ 0 0
4> To change to size of an other window:
WSZ d100 x10 y20 w500 h150
This gives you 2 (100 / 50) seconds to activate the window which
will have the size as the window in Example 1.
5> To put a window to the back:
WSZ b
6> To put an other window to the front:
WSZ a50 f
This checks every second to see if you've changed window.
7> To display info about the window:
WSZ i
8> To move a window back and forvard a number of times:
WSZ b f r50
This puts the window back and forward 50 times.
9> To display info forever:
WSZ i r0
10> To load and execute a script:
WSZ Lscript
This loads the file script and executes the commands just
as normal. If the file "script" cannot be found, WSZ will
look for "S:script" also.
WARNING
It might happen that a window doesn't like that you changed it's size,
which could result in something unexpected. Be careful when resizing
another window.
BUGS
Only the LAST active window will be resized. This because the resizing
will be performed AFTER all other comands have finished. Otherwise the
window would "flash" four times if you change all four parameters.
The same "bug" exists if you moves a screen.
THE FUTURE
Do you got any suggetstions?? I'm running out of ideas.
AUTHOR
This program was written by:
Jimmy Westerlund
Ringvägen 15
890 42 Mellansel
SWEDEN
POSTGIRO : 740205-7835
INTERNET : p3ta28@park1.park.se
BEFORE THE END
I wish to thank Roger Mårtensson and Björn Melinder for some ideas,
which made this program much more fun.
HISTORY
V1.3 1992-09-18
Added the bitMap, Kill, Top, lEft and Update commands.
Added the option / and * to the X, Y, W and H commands.
Added the address option to the F, B and Z commands.
Fixed a bug in the View command.
V1.2 1992-09-02
Added the View and Change commands. Fixed the Repeat command.
Improved the Info command.
Bugs: The View command will not work correctly if the frontmost
screen isn't the active one. Fixed in 1.3.
V1.1 1992-08-29
Added the Zoom and Load commands. Rewrote command handling code.
V1.0 1992-06-26
The first version compleated.